<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>首页</title>
<meta name="keywords" content="个人博客" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="/static/img/icon.ico">
<link rel="stylesheet" type="text/css" href="/static/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">

<link rel="stylesheet" type="text/css" href="/static/libs/fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="/static/css/base.css">
<link rel="stylesheet" type="text/css" href="/static/css/index.css">
<link rel="stylesheet" type="text/css" href="/static/css/m.css">
<link rel="stylesheet" type="text/css" href="/static/css/main.css">
<link rel="stylesheet" type="text/css" href="/static/css/util.css">
<link rel="stylesheet" type="text/css" href="/static/libs/fonts/Linearicons-Free-v1.0.0/icon-font.min.css">

<!--[if lt IE 9]>
<script src="js/modernizr.js"></script>
<![endif]-->

<style type="text/css">
  #user{
    float: right;
    margin-top: 4em !important;
    margin-right: 1em !important;
    font-size: 12px !important;
  }

  #user a{
    color: #528caf;
    cursor: pointer;
    font-size: 0.6em;
    border-radius: 2px;
    margin-left: 0.5em;
  }
  #user a:hover{
    color: gray !important;
  }


</style>

{% block head_css %}
{% endblock %}
</head>

<body>
<header>

  <div id="user">
  {% block user_icon %}
 
    {% if 'user' in session %}
      {% if session.user.name is not none %}
        <i class="glyphicon glyphicon-user" style="color:#528caf;"></i> {{session.user.name|trim}}
        
      {% endif%}
    {% endif%}
  {% endblock %}
   <a href="{{url_for('login.login')}}">登录</a>
   <a href="{{url_for('register.register')}}">注册</a>
    <a href="{{url_for('logout.logout')}}">注销</a> 
  </div>
  <div class="logo">
    <!-- <img src="/static/img/logo.png"> -->
    <h1>LSMO-BLOG</h1>
  </div>


  <nav id="nav">
    <ul>

      <li><a href="{{ url_for('index.index')}}">文章推荐</a></li>
      <!-- <li><a href="{{ url_for('index.index')}}">科技在线</a></li> -->
      <li><a href="javascript:void(0);">科技在线</a><span style="font-size: 4px;">(开发中...)</span></li>
      <li><a href="{{ url_for('beginner.index')}}">小猿必读</a></li>
      <!-- <li><a href="{{ url_for('index.index')}}">哲思人生</a></li> -->
      <li><a href="javascript:void(0);">哲思人生</a><span style="font-size: 4px;">(开发中...)</span></li>
      <!-- <li><a href="{{ url_for('index.index')}}">优质美文</a></li> -->
      <li><a href="javascript:void(0);">优质美文</a><span style="font-size: 4px;">(开发中...)</span></li>
      <li><a href="{{ url_for('myrecord.myrecord')}}">我的记录</a></li>

    </ul>
  </nav>    
</header>

<article>


  <div class="l_box">
    {% block left_box %}
      <div class="search">
      <form action="{{url_for('kw.kw_search')}}" method="post" name="searchform" id="searchform">
        <input name="keyboard" id="keyboard" class="input_text" placeholder="请输入关键字词" style="color: rgb(153, 153, 153);" type="text">
        <input class="input_submit" type="submit" value="搜索">
      </form>
    </div>
    <div class="about_me">
      <h2>关于我</h2>
      <ul>
        <i><img src="/static/img/4.jpg"></i>
        <p><b>Dragon</b>一个90后草根！17年入行。一直潜心研究IT技术，一边工作学习一边积累经验。</p>
      </ul>
    </div>
    <div class="wdxc">
      <h2>我的相册</h2>
      <ul>
        <li><a href="javascript:void(0);"><img src="/static/img/7.jpg"></a></li>
        <li><a href="javascript:void(0);"><img src="/static/img/8.jpg"></a></li>
        <li><a href="javascript:void(0);"><img src="/static/img/9.jpg"></a></li>
        <li><a href="javascript:void(0);"><img src="/static/img/10.jpg"></a></li>
        <li><a href="javascript:void(0);"><img src="/static/img/11.jpg"></a></li>
        <li><a href="javascript:void(0);"><img src="/static/img/12.jpg"></a></li>
      </ul>
    </div>
    <div class="fenlei">
      <h2>文章分类</h2>
      {% block posts_category%}{% endblock %}
    </div>
      <div class="tuijian">
        <h2>站长推荐</h2>
        {%block posts_recommend%}{% endblock %}

      </div>
      <div class="links">
        <h2>友情链接</h2>
        <ul>
          <a href="http://www.xtylsmo.com" target="_blank">Dragon个人网站</a>
        </ul>
      </div>
      <div class="guanzhu">
        <h2>关注我 么么哒</h2>
        <ul>
          <img src="/static/img/QR_ME.jpg">
        </ul>
      </div>
    {% endblock %}
  </div>

  <div class="r_box">
  {% block right_box %}
  
  {% endblock %}
  </div>
  <div class="infosbox">
  {% block infosbox %}
  {% endblock %}
  </div>
</article>

<footer>
<p>Design by <a href="http://www.xtylsmo.com" target="_blank">Dragon个人博客</a> <a href="/">蜀ICP备11002373号-1</a></p>
</footer>

<script type="text/javascript">  
window.onload = function (){
    var obj=null;
    var As=document.getElementById('nav').getElementsByTagName('a');
    obj = As[0];

    for(i=1;i<As.length;i++){
        if(window.location.href.indexOf(As[i].href)>=0)
          obj=As[i];
    }
    obj.id='selected'
}

</script>

{% block body_js %}
<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script type="text/javascript" src="/static/libs/twitter-bootstrap/3.3.7/js/
bootstrap.min.js"></script>

<script type="text/javascript">
</script>
{% endblock %} 
</body>
</html>
